import request from '@/utils/request'

// 查询用量数据列表
export function getDosageList(query) {
    let baseUrl = '/datastatistics/terminalXbStatisticAnalysis/DayOrMonth?frozenType=' + query.frozenType + '&pageNum=' + query.pageNum + '&pageSize=' + query.pageSize
    if (query.sheetsCode != null && query.sheetsCode != '') {
        baseUrl += '&sheetsCode=' + query.sheetsCode
    }
    if (query.userId != null && query.userId != '') {
        baseUrl += '&userId=' + query.userId
    }
    if (query.userName != null && query.userName != '') {
        baseUrl += '&userName=' + query.userName
    }
    if (query.beginTime != null && query.beginTime != '') {
        baseUrl += '&beginTime=' + query.beginTime
    }
    if (query.endTime != null && query.endTime != '') {
        baseUrl += '&endTime=' + query.endTime
    }
    if (query.terminalId != null && query.terminalId != '') {
        baseUrl += '&terminalId=' + query.terminalId
    }
  if (query.locationNb != null && query.locationNb != '') {
    baseUrl += '&locationNb=' + query.locationNb
  }
    if (query.communicateAddress != null && query.communicateAddress != '') {
        baseUrl += '&communicateAddress=' + query.communicateAddress
    }
    if (query.orderByColumn != null) {
        baseUrl += '&orderByColumn=' + query.orderByColumn
    }
    if (query.isAsc != null) {
        baseUrl += '&isAsc=' + query.isAsc
    }
    return request({
        url: baseUrl,
        // url: '/datastatistics/terminalXbStatisticAnalysis/DayOrMonth',
        method: 'get',
        // params: query
    })
}
